<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
	<head>
		<meta charset="UTF-8">
		<title>新增页面</title>
		<link href="../../static/component/pear/css/pear.css" rel="stylesheet" th:href="@{/static/component/pear/css/pear.css}"/>
	</head>
	<body>
		<form class="layui-form" action="">
			<div class="layui-form-item">
					<label class="layui-form-label">菜单名称</label>
						<input type="text" name="title" placeholder="" class="pear-btn pear-btn-md">
					<button class="pear-btn pear-btn-md pear-btn-primary" lay-submit lay-filter="user-query">
						<i class="layui-icon layui-icon-search"></i>
						查询
					</button>
			</div>
		</form>
		<div id="demoTree"></div>
		<script src="../../static/component/layui/layui.js" th:src="@{/static/component/layui/layui.js}"></script>
		<script src="../../static/component/pear/pear.js" th:src="@{/static/component/pear/pear.js}"></script>
		<script>
			let $ = layui.jquery;
			layui.use(['form', 'jquery'], function() {
				let form = layui.form;
				let $ = layui.jquery;

				layui.use(['dtree'], function () {
					dtree = layui.dtree;

					dtree.render({
						elem: "#demoTree",
						initLevel: "1",
						method: 'get',
						url: "/static/admin/data/dtree.json"
					});

				});
			})

			// dtree 点击事件
			$("#getNowParamBtn").click(function(){
				var param = dtree.getNowParam(DemoTree);
				console.log(param);
			});
			var callbackdata = function () {

				let data = null;


				return data;
			}
		</script>
		<script>
		</script>
	</body>
</html>
